#include "RollerController.h"

RollerController::RollerController(NetworkTable* table){
	towerRoller = new Roller(ROLLER_TOWER_CHAN);
	collectorRoller = new Roller(ROLLER_COLLECTOR_CHAN);
	firingRoller = new Roller(ROLLER_SHOOTER_CHAN);
	shooter = new PanShoot();
	netable = table;
}

RollerController::~RollerController() {
	delete towerRoller;
	delete collectorRoller;
	delete firingRoller;
	delete shooter;
}

RollerController::getPosition(){
	goalHAngle = netable->getDouble("HAngle");
	goalVAngle = netable->getDouble("VAngle");
	goalPower = netable->getDouble("Power");
}

RollerController::Callibrate(){
	getPosition;
	shooter->SetVAngle(goalVAngle);
	shooter->SetHAngle(goalHAngle);
	shooter->SetPower(goalPower);
}
